import config from "@/config"
import http from "@/utils/request"

export default {
	//供应商
	apply:{
		list: {
			url: `${config.API_URL}/adminapi/supplier.Supplier/lists`,
			name: "获取供应商列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
			url: `${config.API_URL}/adminapi/supplier.Supplier/add`,
			name: "添加供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/supplier.Supplier/edit`,
			name: "修改供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/supplier.Supplier/delete`,
			name: "删除供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/supplier.Supplier/details`,
			name: "供应商详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/supplier.Supplier/all`,
			name: "供应商 -- 全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        export: {
            url: `${config.API_URL}/adminapi/supplier.Supplier/import`,
			name: "供应商导入",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
        },
	},
}
